;---------------------------------------------------------------------------
;Bomb Lay
[Statedef 1000]
type    = S
movetype= I
physics = S
poweradd = 40*(1-var(53))
velset = 0,0
anim = 1000
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1000, 1]
type = VarSet
trigger1 = !Var(59) && Time < 12
var(10) = 0+1*(Command = "holdfwd")-1*(Command = "holdback")

[State 1000, 2]
type = VarSet
trigger1 = Var(59) && !Time
var(10) = ifelse(P2BodyDist X > 69.25,1,(ifelse(Random > 499,-1,0)))

[State 1000, 3]
type = VarSet
trigger1 = !Var(59) && !Time
var(11) = Cond(Var(44),NumExplod(90000210) != 0,NumExplod(90000240) != 0)

[State 1000, 4]
type = VarSet
trigger1 = Var(59) && !Time
var(11) = Random > 499

[State 1000, 5]
type = VarSet
trigger1 = Var(53)
var(10) = 1

[State 1000, 6]
type = VarSet
trigger1 = var(53)
var(11) = 0

[State 1000, 7]
type = Helper
trigger1 = AnimElem = 4
name = "Bomb"
ID = 1000
stateno = 1001+1*var(11)
pos = ceil(14*const(size.xscale)),0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1000, 8]
type = VarAdd
trigger1 = AnimElem = 4
var(37) = 1

[State 1000, 9]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8030
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 25
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1000, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8030
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 25
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1000, 11]
type = PlaySnd
trigger1 = AnimElem = 2
value = S40,0

[State 1000, 12]
type = PlaySnd
trigger1 = AnimElem = 4
value = S180,0

[State 1000, 13]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Bomb Lay
[Statedef 1001]
type    = S
movetype= I
physics = N
velset = 0,0
anim = 1001+1*(root,var(10) >= 0)
ctrl = 0
sprpriority = 3

[State 1001, 1]
type = VelSet
trigger1 = !Time
x = (0.5+0.5*(root,var(10) = 1)-0.5*(root,var(10) = -1))*const(size.xscale)

[State 1001, 2]
type = StateTypeSet
trigger1 = Time = 71
movetype = A       ;S,A,C,L

[State 1001, 3]
type = ChangeState
trigger1 = Time = 72
value = 1003
;---------------------------------------------------------------------------
;Bomb Lay
[Statedef 1002]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 1001+1*(root,var(10) >= 0)
ctrl = 0
sprpriority = 3

[State 1002, 1]
type = VelSet
trigger1 = !Time
x = (0.5+0.5*(root,var(10) = 1)-0.5*(root,var(10) = -1))*const(size.xscale)

[State 1002, 2]
type = StateTypeSet
trigger1 = Time = 131
movetype = A       ;S,A,C,L

[State 1002, 3]
type = ChangeState
trigger1 = Time = 132
value = 1003
;---------------------------------------------------------------------------
;Bomb Lay
[Statedef 1003]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 902
ctrl = 0
sprpriority = 3

[State 1003, 1]
type = HitDef
triggerall = !NumTarget
trigger1 = root,var(5) < 6 && !Time
attr = S, HP
damage = ceil(100*root,Fvar(21)),25
animtype = Hard
getpower = 0,0
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1,1
sparkno = -1
hitsound = F5,3
guardsound = F6, 0
ground.type = Low
ground.slidetime = 11
ground.hittime  = 22
guard.hittime = 11
ground.velocity = -0.5*const(size.xscale),-9.7*const(size.yscale)
guard.velocity = -4.7
ground.cornerpush.veloff = 0
air.type = Low
air.velocity = -0.5*const(size.xscale),-7.5*const(size.yscale)
yaccel = .35*const(size.yscale)
air.hittime = 100
fall = 1
fall.recover = 0
id = 1000
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1003, 2]
type = PowerAdd
trigger1 = HitPauseTime = 1 && root,Var(53) = 0
value = 50-25*(NumTarget && MoveGuarded)
ignorehitpause = 1

[State 1003, 3]
type = Null
triggerall = NumTarget && MoveHit
trigger1 = root,Cond(FVar(20) > .3, FVar(20) := FVar(20) - .1,0) || root,Cond(FVar(21) > .3, FVar(21) := FVar(21) - .1,0)
ignorehitpause = 1
persistent = 0

[State 1003, 4]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && P2StateType = A
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 1003, 5]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && Var(7) < 150 && PrevStateNo != 1011
trigger1 = HitPauseTime = 1
var(7) = 5
ignorehitpause = 1

[State 1003, 6]
type = TargetState
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
value = 5400
ID = -1
ignorehitpause = 1

[State 1003, 7]
type = PlaySnd
trigger1 = !Time
value = S190,0

[State 1003, 8]
type = ChangeState
trigger1 = !AnimTime
value = 1004
ignorehitpause = 1
;---------------------------------------------------------------------------
;Bomb Lay
[Statedef 1004]
type    = S
movetype= I
physics = N
velset = 0,0
anim = 1
ctrl = 0
sprpriority = 3

[State 1004, 1]
type = VarAdd
trigger1 = !Time
var(0) = 1

[State 1004, 2]
type = ParentVarAdd
trigger1 = !Time
var(37) = -1

[State 1004, 3]
type = DestroySelf
trigger1 = !NumTarget && Anim = 1
trigger2 = NumTarget && Anim = 1
trigger2 = target,StateType = L
;---------------------------------------------------------------------------
;EX Bomb Lay
[Statedef 1010]
type    = S
movetype= A
physics = S
poweradd = -500
velset = 0,0
anim = 1000
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1010, 1]
type = Helper
trigger1 = AnimElem = 4
name = "EX Bomb"
ID = 1010
stateno = 1011
pos = ceil(14*const(size.xscale)),0
postype = p1
facing = 1
keyctrl = 1
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1010, 2]
type = VarAdd
trigger1 = AnimElem = 4
var(14) = 1

[State 1010, 3]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1010, 4]
type = PlaySnd
trigger1 = !Time
value = F799,0
channel = 10

[State 1010, 5]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8034
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 25
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1010, 6]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8034
ID = 8030
pos = 223,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 25
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1010, 7]
type = PlaySnd
trigger1 = AnimElem = 2
value = S40,0

[State 1000, 8]
type = PlaySnd
trigger1 = AnimElem = 4
value = S180,0

[State 1010, 9]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Bomb Lay
[Statedef 1011]
type    = S
movetype= I
physics = N
velset = 0,0
anim = 1001
ctrl = 0
sprpriority = 3

[State 1011, 1]
type = PalFX
trigger1 = !(GameTime%2) || !AnimTime
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1011, 2]
type = StateTypeSet
triggerall = Time >= 10
trigger1 = root,var(59) = 0 && (root,NumExplod(90000002) || root,NumExplod(90000003) || root,NumExplod(90000001)) && root,NumExplod(90000230) && root,NumExplod(90000240)
trigger2 = root,var(59) && root,MoveType != H && (P2Dist X = [-8,8]) && P2StateType != L && Pos Y = 0
movetype = A

[State 1011, 3]
type = ChangeState
triggerall = Time >= 10
trigger1 = root,var(59) = 0 && (root,NumExplod(90000002) || root,NumExplod(90000003) || root,NumExplod(90000001)) && root,NumExplod(90000230) && root,NumExplod(90000240)
trigger2 = root,var(59) && root,MoveType != H && (P2Dist X = [-8,8]) && P2StateType != L && Pos Y = 0
value = 1012

[State 1011, 4]
type = DestroySelf
trigger1 = root,StateNo = [4910,4912]
;---------------------------------------------------------------------------
;Bomb Lay
[Statedef 1012]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 902
ctrl = 0
sprpriority = 3

[State 1003, 1]
type = HitDef
trigger1 = root,var(5) < 6 && !Time
attr = S, SP
damage = ceil(100*root,Fvar(21)),25
animtype = Hard
guardflag = MAF
hitflag = MAF
priority = 4, Hit
getpower = 0
pausetime = 1,1
sparkno = -1
hitsound = F5,3
guardsound = F6, 0
ground.type = Low
ground.slidetime = 11
ground.hittime  = 22
guard.hittime = 11
ground.velocity = -0.5*const(size.xscale),-9.7*const(size.yscale)
guard.velocity = -4.7
ground.cornerpush.veloff = 0
air.type = Low
air.velocity = -0.5*const(size.xscale),-7.5*const(size.yscale)
yaccel = .35*const(size.yscale)
air.hittime = 15
fall = 1
fall.recover = 0
id = 1000
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1003, 3]
type = PowerAdd
trigger1 = HitPauseTime = 1 && root,Var(53) = 0
value = 50-25*(NumTarget && MoveGuarded)
ignorehitpause = 1

[State 1003, 4]
type = Null
triggerall = NumTarget && MoveHit
trigger1 = root,Cond(FVar(20) > .3, FVar(20) := FVar(20) - .1,0) || root,Cond(FVar(21) > .3, FVar(21) := FVar(21) - .1,0)
ignorehitpause = 1
persistent = 0

[State 1003, 5]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && P2StateType = A
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 1003, 6]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && Var(7) < 150 && PrevStateNo != 1011
trigger1 = HitPauseTime = 1
var(7) = 5
ignorehitpause = 1

[State 1003, 7]
type = TargetState
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
value = 5400
ID = -1
ignorehitpause = 1

[State 1003, 8]
type = PlaySnd
trigger1 = !Time
value = S190,0

[State 1003, 9]
type = ChangeState
trigger1 = !AnimTime
value = 1013
ignorehitpause = 1
;---------------------------------------------------------------------------
;Bomb Lay
[Statedef 1013]
type    = S
movetype= I
physics = N
velset = 0,0
anim = 1
ctrl = 0
sprpriority = 3

[State 1013, 1]
type = ParentVarAdd
trigger1 = !Time
var(14) = -1

[State 1013, 2]
type = DestroySelf
trigger1 = !NumTarget && Anim = 1
trigger2 = NumTarget && Anim = 1
trigger2 = target,StateType = L
;---------------------------------------------------------------------------
;Bombs Away
[Statedef 1050]
type    = S
movetype= I
physics = S
poweradd = 40*(1-var(53))
velset = 0,0
anim = 1050
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1050, 1]
type = VarSet
trigger1 = !Var(59) && Time < 12
var(10) = (1+1*(Command = "holdback"))-2*(Command != "holdfwd" && Command != "holdback")

[State 1050, 2]
type = VarSet
trigger1 = !Time
var(10) = ifelse(P2BodyDist X <= 187.42, ifelse(P2BodyDist X <= 108.2,2,0), 1)

[State 1050, 3]
type = VarSet
trigger1 = !var(59) && !Time
var(11) = Cond(Var(44),NumExplod(90000210) != 0,NumExplod(90000240) != 0)

[State 1050, 4]
type = VarSet
trigger1 = var(59) && !Time
var(11) = random > 300

[State 1050, 5]
type = VarSet
trigger1 = Var(53)
var(10) = 1

[State 1050, 6]
type = VarSet
trigger1 = Var(53)
var(11) = 1

[State 1050, 7]
type = Helper
trigger1 = AnimElem = 4
name = "Flying Bomb"
ID = 1050
stateno = 1051+1*var(11)
pos = ceil(12*const(size.xscale)),ceil(-42*const(size.yscale))
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1050, 8]
type = VarAdd
trigger1 = AnimElem = 4
var(37) = 1

[State 1050, 9]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8031
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 26
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1050, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8031
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 26
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1050, 11]
type = PlaySnd
trigger1 = AnimElem = 1
value = S180,0

[State 1050, 12]
type = PlaySnd
trigger1 = AnimElem = 4
value = F0,3

[State 1050, 13]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Bombs Away
[Statedef 1051]
type    = A
movetype= I
physics = N
velset = 0,0
anim = 1001
ctrl = 0
sprpriority = 3

[State 1051, 1]
type = VelSet
trigger1 = root, StateNo != 1060 && root, StateNo != 1065 && !Time
x = (2.5+2.3*(root,var(10) = 1)-2.0*(root,var(10) = 2))*const(size.xscale)
y = -8.5*const(size.yscale)

[State 1051, 2]
type = VelSet
trigger1 = (root, StateNo = 1060 || root, StateNo = 1065) && !Time
x = (2.5+2.3*(root,var(11) = 1))*const(size.xscale)
y = -8.5*const(size.yscale)

[State 1051, 3]
type = Gravity
trigger1 = 1

[State 1051, 4]
type = StateTypeSet
trigger1 = Time = 29
movetype = A       ;S,A,C,L

[State 1051, 5]
type = ChangeState
trigger1 = Time = 30
value = 1053
;---------------------------------------------------------------------------
;Bombs Away
[Statedef 1052]
type    = A
movetype= I
physics = N
velset = 0,0
anim = 1001
ctrl = 0
sprpriority = 3

[State 1052, 1]
type = VelSet
trigger1 = (root, StateNo != 1060 && root, StateNo != 1065) && !Time
x = (2.5+2.3*(root,var(10) = 1)-2.0*(root,var(10) = 2))*const(size.xscale)
y = -8.5*const(size.yscale)

[State 1052, 2]
type = VelSet
trigger1 = (root, StateNo = 1060 || root, StateNo = 1065) && !Time
x = (2.5+2.3*(root,var(11) = 0))*const(size.xscale)
y = -8.5*const(size.yscale)

[State 1052, 3]
type = Gravity
trigger1 = 1

[State 1052, 4]
type = StateTypeSet
trigger1 = Time = 39
movetype = A       ;S,A,C,L

[State 1052, 5]
type = ChangeState
trigger1 = Time = 40
value = 1053
;---------------------------------------------------------------------------
;Bombs Away
[Statedef 1053]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 1053
ctrl = 0
sprpriority = 3

[State 1053, 1]
type = HitDef
trigger1 = !NumTarget && root,Var(12) = 0 && !Time
attr = S, HP
damage = ceil(75*root,Fvar(21)),19
getpower = 75*(1-parent,var(53)), 37*(1-parent,var(53))
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1,1
sparkno = -1
hitsound = F5,3
guardsound = F6, 0
ground.type = Low
ground.slidetime = 11
ground.hittime  = 22
guard.hittime = 11
ground.velocity = -3.6*const(size.xscale),-3.2*const(size.yscale)
guard.velocity = -4.7*const(size.xscale)
ground.cornerpush.veloff = 0
air.type = Low
air.velocity = -3.1*const(size.xscale),-2.8*const(size.yscale)
yaccel = .35*const(size.yscale)
air.hittime = 15
fall = 1
fall.recover = 0
id = 1000
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1053, 2]
type = HitDef
trigger1 = !NumTarget && root,Var(12) && !Time
attr = S, HP
damage = ceil(75*root,Fvar(21)),19
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
getpower = 0
pausetime = 1,1
sparkno = -1
hitsound = F5,3
guardsound = F6, 0
ground.type = Low
ground.slidetime = 11
ground.hittime  = 22
guard.hittime = 11
ground.velocity = -3.6*const(size.xscale),-3.2*const(size.yscale)
guard.velocity = -4.7*const(size.xscale)
ground.cornerpush.veloff = 0
air.type = Low
air.velocity = -3.1*const(size.xscale),-2.8*const(size.yscale)
yaccel = .35*const(size.yscale)
air.hittime = 15
fall = 1
fall.recover = 0
id = 1050
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1053, 3]
type = PowerAdd
trigger1 = HitPauseTime = 1 && root,Var(53) = 0
value = 50-25*(NumTarget && MoveGuarded)
ignorehitpause = 1

;[State 1053, 4]
;type = Null
;triggerall = NumTarget && MoveHit
;trigger1 = root,Cond(FVar(20) > .3, FVar(20) := FVar(20) - .1,0) || root,Cond(FVar(21) > .3, FVar(21) := FVar(21) - .1,0)
;ignorehitpause = 1
;persistent = 0

[State 1053, 5]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && P2StateType = A
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 1053, 7]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && Var(7) < 150 && root,Var(12) = 0
trigger1 = HitPauseTime = 1
var(7) = 5
ignorehitpause = 1

[State 1053, 8]
type = TargetState
trigger1 = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
value = 5400
ID = -1
ignorehitpause = 1

[State 1053, 9]
type = PlaySnd
trigger1 = !Time
value = S190,0

[State 1053, 10]
type = ChangeState
trigger1 = !AnimTime
value = 1004
;---------------------------------------------------------------------------
;Bombs Away
[Statedef 1055]
type    = A
movetype= I
physics = N
poweradd = 40
anim = 1055
ctrl = 0
sprpriority = 2

[State 1055, 1]
type = VarSet
trigger1 = Time < 12
var(10) = (1+1*(Command = "holdback"))-2*(Command != "holdfwd" && Command != "holdback")

[State 1055, 2]
type = VarSet
trigger1 = Var(59) && !Time
var(10) = ifelse(P2BodyDist X <= 187.42, ifelse(P2BodyDist X <= 108.2,2,0), 1)

[State 1055, 3]
type = VarSet
trigger1 = !Time
var(11) = Cond(Var(44),NumExplod(90000210) != 0,NumExplod(90000240) != 0)

[State 1055, 4]
type = VarSet
trigger1 = var(59) && !Time
var(11) = random > 300

[State 1055, 5]
type = VarSet
trigger1 = var(53)
var(10) = 1

[State 1055, 6]
type = VarSet
trigger1 = var(53)
var(11) = 1

[State 1055, 7]
type = Helper
trigger1 = AnimElem = 4
name = "Flying Bomb"
ID = 1050
stateno = 1051+1*var(11)
pos = ceil(12*const(size.xscale)),ceil(-42*const(size.yscale))
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1055, 8]
type = VarAdd
trigger1 = AnimElem = 4
var(37) = 1

[State 1055, 9]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8031
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 26
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1055, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8031
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 26
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1055, 11]
type = PlaySnd
trigger1 = AnimElem = 1
value = S180,0

[State 1055, 12]
type = PlaySnd
trigger1 = AnimElem = 4
value = F0,3

[State 1055, 13]
type = VarSet
trigger1 = !Time
fvar(10) = Vel X

[State 1055, 14]
type = VarSet
trigger1 = !Time
fvar(11) = Vel Y

[State 1055, 15]
type = VelSet
trigger1 = !Time
x = (-.2*(-1*(fvar(10) > 0) + 1*(fvar(10) < 0)))*const(size.yscale)
y = (-.2*(-1*(fvar(11) > 0) + 1*(fvar(11) < 0)))*const(size.yscale)

[State 1055, 16]
type = VelAdd
trigger1 = AnimElemTime(7) >= 0
y = .44*const(size.yscale)

[State 1055, 17]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y && AnimElemTime(7) >= 0
value = 1056
;---------------------------------------------------------------------------
;Bombs Away (Land)
[Statedef 1056]
type    = S
movetype= I
physics = N
velset = 0,0
anim = 1056
ctrl = 0
sprpriority = 2

[State 1056, 1]
type = PosSet
trigger1 = !Time
y = 0

[State 1056, 2]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;EX Bombs Away
[Statedef 1060]
type    = S
movetype= I
physics = S
poweradd = -500
velset = 0,0
anim = 1050
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1060, 1]
type = VarSet
trigger1 = Time = 8
var(11) = (NumExplod(90000002) != 0 || NumExplod(90000003) != 0 || NumExplod(90000001) != 0)

[State 1060, 2]
type = VarSet
trigger1 = !Time
var(12) = 1

[State 1060, 3]
type = Helper
trigger1 = AnimElem = 4
name = "Flying Bomb"
ID = 1050
stateno = 1051
pos = ceil(12*const(size.xscale)),ceil(-42*const(size.yscale))
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1060, 4]
type = Helper
trigger1 = AnimElem = 4
name = "Flying Bomb"
ID = 1051
stateno = 1052
pos = ceil(12*const(size.xscale)),ceil(-42*const(size.yscale))
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1060, 5]
type = VarAdd
trigger1 = AnimElem = 4
var(37) = 2

[State 1060, 6]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8035
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 26
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1060, 7]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8035
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 26
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1060, 8]
type = PlaySnd
trigger1 = AnimElem = 1
value = S180,0

[State 1060, 9]
type = PlaySnd
trigger1 = AnimElem = 4
value = F0,3

[State 1060, 10]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1060, 11]
type = PlaySnd
trigger1 = !Time
value = F799,0
channel = 10

[State 1060, 12]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Bombs Away
[Statedef 1065]
type    = A
movetype= I
physics = N
poweradd = -500
anim = 1055
ctrl = 0
sprpriority = 2

[State 1065, 1]
type = VarSet
trigger1 = Time = 8
var(11) = (NumExplod(90000002) != 0 || NumExplod(90000003) != 0 || NumExplod(90000001) != 0)

[State 1065, 2]
type = Helper
trigger1 = AnimElem = 4
name = "Flying Bomb"
ID = 1050
stateno = 1051
pos = ceil(12*const(size.xscale)),ceil(-42*const(size.yscale))
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1065, 3]
type = Helper
trigger1 = AnimElem = 4
name = "Flying Bomb"
ID = 1050
stateno = 1052
pos = ceil(12*const(size.xscale)),ceil(-42*const(size.yscale))
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1065, 4]
type = VarAdd
trigger1 = AnimElem = 4
var(37) = 2

[State 1065, 5]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8035
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 26
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1065, 6]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8035
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 26
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1065, 7]
type = PlaySnd
trigger1 = AnimElem = 1
value = S180,0

[State 1065, 8]
type = PlaySnd
trigger1 = AnimElem = 4
value = F0,3

[State 1065, 9]
type = VarSet
trigger1 = !Time
fvar(10) = Vel X

[State 1065, 10]
type = VarSet
trigger1 = !Time
fvar(11) = Vel Y

[State 1065, 11]
type = VelSet
trigger1 = !Time
x = (-.2*(-1*(fvar(10) > 0) + 1*(fvar(10) < 0)))*const(size.xscale)
y = (-.2*(-1*(fvar(11) > 0) + 1*(fvar(11) < 0)))*const(size.yscale)

[State 1065, 12]
type = VelAdd
trigger1 = AnimElemTime(7) >= 0
y = .44*const(size.yscale)

[State 1065, 13]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1065, 14]
type = PlaySnd
trigger1 = !Time
value = F799,0
channel = 10

[State 1065, 15]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y && AnimElemTime(7) >= 0
value = 1056
;---------------------------------------------------------------------------
;Air Strike
[Statedef 1100]
type    = S
movetype= A
physics = N
poweradd = 80
velset = 0,0
anim = 1100+(3*(Cond(Var(44),NumExplod(90000200) != 0,NumExplod(90000230) != 0)))
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1100, 1]
type = VarSet
trigger1 = !Var(59) && !Time
var(11) = Cond(Var(44),NumExplod(90000200) != 0,NumExplod(90000230) != 0)

[State 1100, 2]
type = VarSet
trigger1 = Var(59) && !Time
var(11) = abs(P2BodyDist X) <= 38.6 

[State 1100, 3]
type = StateTypeSet
trigger1 = AnimElem = 4
statetype = A

[State 1100, 4]
type = VelAdd
trigger1 = AnimElemTime(4) >= 0
y = .44*const(size.yscale)

[State 1100, 5]
type = VelSet
trigger1 = AnimElem = 4
x = (3.7-1.8*Var(11))*const(size.xscale)
y = (-9.7+1.5*Var(11))*const(size.yscale)

[State 1100, 6]
type = VelSet
trigger1 = AnimElem = 5
x = 0

[State 1100, 7]
type = NotHitBy
trigger1 = Var(11) && !Time
value = SCA
time = 11

[State 1100, 8]
type = HitDef
Trigger1 = Var(5) < 6 && !Time
attr = A, ST
hitflag = AF
priority = 1, Miss
sparkno = -1
p1sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 1101
p2stateno = 1102
guard.dist = 0
fall = 1
fall.recover = 0
fall.recovertime = 1
numhits = 0

[State 1100, 9]
type = AssertSpecial
trigger1 = Var(11) && Time <= 11 && (GameTime % 2) = 0
flag = invisible

[State 1100, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8032
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1100, 11]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8032
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1100, 12]
type = RemoveExplod
trigger1 = AnimElem = 5
id = 8030

[State 1100, 13]
type = PlaySnd
trigger1 = AnimElem = 4
value = S40,0

[State 1100, 13]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 1056
;---------------------------------------------------------------------------
;Air Strike
[Statedef 1101]
type    = A
movetype= A
physics = N
poweradd = 120
anim = 1101
ctrl = 0
sprpriority = -3

[State 1101, 1]
type = TargetBind
trigger1 = Time <= 4
pos = 14,-26

[State 1101, 2]
type = TargetBind
trigger1 = Time > 4 && Time <= 7
pos = 14,-6

[State 1101, 3]
type = TargetBind
trigger1 = Time > 7 && Time <= 10
pos = 16,-6

[State 1101, 4]
type = TargetBind
trigger1 = Time > 10 && Time <= 13
pos = 14,-6

[State 1101, 5]
type = TargetBind
trigger1 = Time > 13 && Time <= 22
pos = 12,-6

[State 1101, 6]
type = TargetBind
trigger1 = Time > 22 && Time <= 25
pos = 14,-6

[State 1101, 7]
type = SprPriority
trigger1 = AnimElem = 2
value = 2

[State 1101, 8]
type = SprPriority
trigger1 = AnimElem = 7
value = -3

[State 1101, 9]
type = Gravity
trigger1 = Vel Y < 0

[State 1101, 10]
type = VelSet
triggerall = Time < 32
trigger1 = Vel Y >= 0
y = 0

[State 1101, 11]
type = VelSet
trigger1 = Vel Y = 0
x = 0

[State 1101, 12]
type = VelAdd
trigger1 = Time >= 32
y = -.25*const(size.yscale)

[State 1101, 13]
type = StateTypeSet
trigger1 = Time = 32
statetype = A
physics = A

[State 1101, 14]
type = Helper
trigger1 = AnimElem = 7
name = "Attached Bomb"
ID = 1100
stateno = 1105
pos = 0,ceil(-16*const(size.xscale))
postype = p2
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1101, 15]
type = PlaySnd
trigger1 = !Time
value = F720,0

[State 1101, 16]
type = PlaySnd
trigger1 = AnimElem = 7
value = F0,3

[State 1101, 17]
type = PalFX
trigger1 = Var(13) = 1 && !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1101, 18]
type = Null
triggerall = Var(13) != 1
trigger1 = !Time
value = 50

[State 1101, 19]
type = VarAdd
trigger1 = PrevStateNo != 1110 && !Time
var(7) = 5

[State 725, 20]
type = VarSet
trigger1 = !Time
var(5) = 10

[State 1101, 21]
type = RemoveExplod
trigger1 = AnimElem = 8
id = 8030
;---------------------------------------------------------------------------
;Air Strike
[Statedef 1102]
type    = A
movetype= H
physics = N
poweradd = 60
velset = 0,0
ctrl = 0
sprpriority = -2

[State 1102, 1]
type = ChangeAnim2
trigger1 = !Time
value = 1102

[State 1102, 2]
type = VelSet
trigger1 = AnimElem = 3
x = -4.5
y = 6.8

[State 1102, 3]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 1103
;---------------------------------------------------------------------------
;Air Strike
[Statedef 1103]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 1103, 1]
type = ChangeAnim
trigger1 = !Time
value = 5100

[State 1103, 2]
type = LifeAdd
trigger1 = !Time
value = -20
kill = 0

[State 1103, 3]
type = PlaySnd
trigger1 = !Time
value = F7,0

[State 1103, 4]
type = PosSet
trigger1 = !Time
y = 0

[State 1103, 5]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP,AT
time = 1

[State 1103, 6]
type = ChangeState
trigger1 = Time = 5
value = 1104
;---------------------------------------------------------------------------
;Air Strike
[Statedef 1104]
type    = A
movetype= H
physics = N
velset = -4.5,-5.5
ctrl = 0
sprpriority = -2

[State 1104, 1]
type = ChangeAnim
trigger1 = !Time
value = Cond(SelfAnimExist(25420),25420,5420)

[State 1104, 2]
type = Gravity
trigger1 = 1

[State 1104, 3]
type = NotHitBy
trigger1 = 1 
value = SCA
time = 1

[State 1104, 4]
type = LifeAdd
trigger1 = !Time
value = -100
kill = 1

[State 1104, 5]
type = SelfState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 5100
;---------------------------------------------------------------------------
;Air Strike
[Statedef 1105]
type    = A
movetype= I
physics = N
anim = 1001
velset = 0,0
ctrl = 0
sprpriority = 3

[State 1105, 1]
type = PosSet
trigger1 = enemynear(0),MoveType = H
x = enemynear(0),Pos X
y = (enemynear(0), Pos Y) - 16

[State 1105, 2]
type = PalFX
trigger1 = root,Var(13) = 1 && !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1105, 3]
type = ChangeState
trigger1 = enemynear(0),StateNo = 1103 && enemynear(0),Time = 5
value = 1106
;---------------------------------------------------------------------------
;Bomb Lay
[Statedef 1106]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 1053
ctrl = 0
sprpriority = 3

[State 1106, 2]
type = Null
triggerall = !Time
trigger1 = root,Cond(FVar(20) > .3, FVar(20) := FVar(20) - .1,0) || root,Cond(FVar(21) > .3, FVar(21) := FVar(21) - .1,0)
ignorehitpause = 1
persistent = 0

[State 1106, 3]
type = ParentVarAdd
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 1106, 4]
type = PlaySnd
trigger1 = !Time
value = S190,0

[State 1106, 4]
type = PlaySnd
trigger1 = !Time
value = F5,3

[State 1106, 7]
type = HitAdd
trigger1 = !Time
value = 1

[State 1106, 8]
type = DestroySelf
trigger1 = !AnimTime
;---------------------------------------------------------------------------
;EX Air Strike
[Statedef 1110]
type    = S
movetype= A
physics = N
poweradd = -500
velset = 0,0
anim = 1110
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1110, 1]
type = StateTypeSet
trigger1 = AnimElem = 3
statetype = A

[State 1110, 2]
type = VelSet
trigger1 = AnimElem = 3
x = 2.7*const(size.xscale)
y = -8.7*const(size.yscale)

[State 1100, 3]
type = VelAdd
trigger1 = AnimElemTime(3) >= 0
y = .44*const(size.yscale)

[State 1110, 4]
type = VelSet
trigger1 = AnimElem = 5
x = 0

[State 1110, 5]
type = VarSet
trigger1 = !Time
var(13) = 1

[State 1110, 6]
type = HitDef
Trigger1 = Var(5) < 6  && !Time
attr = A, ST
hitflag = AF
priority = 1, Miss
sparkno = -1
p1sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 1101
p2stateno = 1102
guard.dist = 0
fall = 1
fall.recover = 0
fall.recovertime = 1
numhits = 0

[State 1110, 7]
type = NotHitBy
trigger1 = !Time
value = SCA,AA,AP,AT
time = 9

[State 1110, 8]
type = AssertSpecial
trigger1 = Time <= 9 && (GameTime % 2) = 0
flag = invisible

[State 1110, 9]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8036
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1110, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8036
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1110, 11]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1110, 12]
type = RemoveExplod
trigger1 = Time = 28 
id = 8030

[State 1100, 13]
type = PlaySnd
trigger1 = !Time
value = F799,0
channel = 10

[State 1110, 14]
type = PlaySnd
trigger1 = AnimElem = 3
value = S40,0

[State 1110, 15]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 1056
;---------------------------------------------------------------------------
;Self Destruct
[Statedef 1150]
type    = S
movetype= A
physics = S
poweradd = 60
velset = 0,0
anim = 1150
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1150, 1]
type = Helper
trigger1 = AnimElem = 2
name = "bomberman u scrooed up"
ID = 1150
stateno = 1151
pos = ceil(28*const(size.xscale)),0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1150, 2]
type = NotHitBy
trigger1 = Time < 38
value = SCA
time = 1

[State 1150, 3]
type = Explod
trigger1 = AnimElem = 4
anim = 6001
ID = 1150 
pos = ceil(7*const(size.xscale)),ceil(-13*const(size.xscale))
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 8
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 1150, 4]
type = LifeAdd
trigger1 = Time = 21
value = -100
kill = 1

[State 1150, 5]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8033
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1150, 6]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8033
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1150, 7]
type = PlaySnd
trigger1 = AnimElem = 1
value = S180,0

[State 1150, 8]
type = PlaySnd
trigger1 = AnimElem = 4 
value = F5,4

[State 1150, 9]
type = Null
trigger1 = AnimElem = 4 && Life <= 100
value = 5600

[State 1150, 10]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Bomb Lay
[Statedef 1151]
type    = S
movetype= I
physics = N
velset = 0,0
anim = 1151
ctrl = 0
sprpriority = 5

[State 1151, 1]
type = ChangeState
trigger1 = Time = 10
value = 1152
;---------------------------------------------------------------------------
;Bomb Lay
[Statedef 1152]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 902
ctrl = 0
sprpriority = 5

[State 1152, 1]
type = HitDef
trigger1 = root,Var(5) < 6 && !Time
attr = S, HP
damage = ceil(100*root,Fvar(21)),25
animtype = Hard
guardflag = MAF
hitflag = MAF
priority = 4, Hit
pausetime = 1,1
sparkno = -1
hitsound = F5,3
guardsound = F6, 0
ground.type = Low
ground.slidetime = 11
ground.hittime  = 22
guard.hittime = 11
ground.velocity = -3.5*const(size.xscale),-5.7*const(size.yscale)
ground.cornerpush.veloff = 0
air.type = Low
air.velocity = -3.5*const(size.xscale),-5.5*const(size.yscale)
yaccel = .35*const(size.yscale)
air.hittime = 15
fall = 1
fall.recover = 0
id = 1150
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1
getpower = 0,0
givepower = 60,30

[State 1152, 2]
type = PowerAdd
trigger1 = !Time
value = 120-60*(NumTarget && MoveGuarded)
ignorehitpause = 1

[State 1152, 3]
type = Null
triggerall = NumTarget && MoveHit
trigger1 = root,Cond(FVar(20) > .3, FVar(20) := FVar(20) - .1,0) || root,Cond(FVar(21) > .3, FVar(21) := FVar(21) - .1,0)
ignorehitpause = 1
persistent = 0

[State 1152, 4]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && P2StateType = A
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 1152, 5]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && Var(7) < 150 && PrevStateNo != 1011
trigger1 = HitPauseTime = 1
var(7) = 5
ignorehitpause = 1

[State 1152, 6]
type = TargetState
trigger1 = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
value = 5400
ID = -1
ignorehitpause = 1

[State 1152, 7]
type = PlaySnd
trigger1 = !Time
value = S190,0

[State 1152, 8]
type = SprPriority
trigger1 = 1
value = 5

[State 1152, 9]
type = VarAdd
trigger1 = HitPauseTime = 1
var(0) = 1
ignorehitpause = 1

[State 1152, 10]
type = ChangeState
trigger1 = !AnimTime
value = 1153
;---------------------------------------------------------------------------
;Bomb Lay
[Statedef 1153]
type    = S
movetype= I
physics = N
velset = 0,0
anim = 1
ctrl = 0
sprpriority = 3

[State 1153, 1]
type = DestroySelf
trigger1 = !NumTarget && Anim = 1
trigger2 = NumTarget && Anim = 1
trigger2 = target,StateType = L